<!DOCTYPE html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
  <title></title>
  <script type='text/javascript' src='js/vue.js'></script>
</head>
<body>
  <div id='app'>
    <div>
      <p>{{ msg | upper("多多关照")}}</p>
      <p>{{ msg | upper}}</p>
      <p>{{ date | format}}</p>
    </div>
  </div>
  <script src="./js/moment.js"></script>
  <script type='text/javascript'>

    Vue.filter('format', function(val) {
      return moment().format('YYYY-MM-DD HH:mm:ss');
    });

    var vm = new Vue({
      el: '#app',
      data: {
        msg: 'hello Vue',
        date: new Date()
      },
      methods: {
      },
      filters: {
        upper(val, str=' 哈哈哈'){
          return val+' '+str;
        }
      }
    });
  </script>
</body>
</html>